﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mighty.Lib.Document;

namespace Mighty.Lib.Repository
{
    public class DefaultDocumentRepository : IDocumentRepository
    {
        #region IDocumentRepository Members

        private IOpenProvider _loadProvider = null;
        private ISaveProvider _saveProdiver = null;

        public DefaultDocumentRepository(IOpenProvider loadProvider, ISaveProvider saveProvider)
        {
            _loadProvider = loadProvider;
            _saveProdiver = saveProvider;
        }

        public IDocument New()
        {
            return new DefaultDocument();
        }

        public IDocument Open(Dictionary<string, object> loadParameters)
        {

            return new DefaultDocument(_loadProvider, loadParameters);
        }

        public void Save(Dictionary<string, object> saveParameters)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
